package com.ly.dto;

import java.util.List;
import java.util.Objects;

public class StudentClassDTO {
    /**
     * 班级代码
     */
    private String classCode;

    /**
     * 班级名
     */
    private String className;

    /**
     * 所选择的学生的学号集合
     */
    private List<Long> selectedSnoList;

    public StudentClassDTO(String classCode, String className, List<Long> selectedSnoList) {
        this.classCode = classCode;
        this.className = className;
        this.selectedSnoList = selectedSnoList;
    }

    public StudentClassDTO() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StudentClassDTO that = (StudentClassDTO) o;
        return Objects.equals(classCode, that.classCode) && Objects.equals(className, that.className) && Objects.equals(selectedSnoList, that.selectedSnoList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(classCode, className, selectedSnoList);
    }

    @Override
    public String toString() {
        return "StudentClassDTO{" +
                "classCode='" + classCode + '\'' +
                ", className='" + className + '\'' +
                ", selectedSnoList=" + selectedSnoList +
                '}';
    }

    public String getClassCode() {
        return classCode;
    }

    public void setClassCode(String classCode) {
        this.classCode = classCode;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public List<Long> getSelectedSnoList() {
        return selectedSnoList;
    }

    public void setSelectedSnoList(List<Long> selectedSnoList) {
        this.selectedSnoList = selectedSnoList;
    }
}
